﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Master/Admin.Master" AutoEventWireup="true"
    CodeBehind="PartContentList.aspx.cs" Inherits="Besture.UI.Admin.Content.PartContentList" %>

<%@ Register assembly="DevExpress.Web.ASPxEditors.v11.2" namespace="DevExpress.Web.ASPxEditors" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.ASPxGridView.v11.2" namespace="DevExpress.Web.ASPxGridView" tagprefix="dx" %>

<asp:Content ID="Content1" ContentPlaceHolderID="Head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Content" runat="server">
    <div class="listPage">
        <!-- Begin 操作条 -->
        <div class="operateBar">
            <ul>
                <li><a href="javascript:grid.SelectRows();" class="operate-all"><s class="icon-gou-red"></s>全选</a></li>
                <li><a href="javascript:grid.UnselectRows();" class="operate-cancel"><s class="icon-cancel-yellow"></s>
                    取消</a></li>
                <li>
                    <asp:LinkButton ID="lbAllDelete" runat="server" OnClientClick="return confirm('删除后无法恢复，确定删除选中项吗?');"
                        class="operate-delete" OnClick="lbDel_Click"><s class="icon-delete"></s>删除</asp:LinkButton>
                </li>
                <li>
                    <asp:LinkButton ID="lbAdd" runat="server" class="operate-add" OnClick="lbAdd_Click"><s class="icon-add-green"></s>添加</asp:LinkButton>
                </li>
                <%--<li><asp:LinkButton ID="lbExcel" runat="server" OnClick="btnExport_Click" CssClass="operate-export"><s class="icon-export-blue"></s>导出</asp:LinkButton></li>--%>
                <li style="display: none">
                    <asp:TextBox runat="server" ID="txtProType"></asp:TextBox>
                    <asp:Button runat="server" Text="属性设置" ID="btnProButton" OnClick="btnProButton_Click" />
                </li>
            </ul>
            <%--<table style="float: right; margin-right: 10px;">
                <tr>
                    <td>
                        <div class="slidedown">
                            <input class="slidedownbtn" type="button" value="相关设置" />
                            <div class="slidedownmenu">
                                <ul>
                                    <li><a href="javascript:ProSet('1')">显示</a></li>
                                    <li><a href="javascript:ProSet('2')">隐藏</a></li>
                                </ul>
                                <ul>
                                    <li><a href="javascript:ProSet('3')">网站置顶</a></li>
                                    <li><a href="javascript:ProSet('4')">取消置顶</a></li>
                                </ul>
                                <ul>
                                    <li><a href="javascript:ProSet('5')">栏目置顶</a></li>
                                    <li><a href="javascript:ProSet('6')">取消置顶</a></li>
                                </ul>
                            </div>
                        </div>
                    </td>
                </tr>
            </table>--%>
        </div>
        <!-- //End 操作条 -->
        <!--显示下拉列表数据源-->
        <%--<asp:SqlDataSource runat="server" ID="dataSourceDisplay"></asp:SqlDataSource>
        <!--网站置顶数据源-->
        <asp:SqlDataSource runat="server" ID="dataSourceWebStick"></asp:SqlDataSource>
        <!--栏目置顶数据源-->
        <asp:SqlDataSource runat="server" ID="dataSourceClassStick"></asp:SqlDataSource>--%>
        <cms:ASPxGridView ID="grid" ClientInstanceName="grid" runat="server" Width="100%"
            AutoGenerateColumns="False" CssClass="table-module03" KeyFieldName="ID" OnCustomCallback="grid_CustomCallback"
            OnRowDeleting="grid_RowDeleting">
            <Columns>
                <cms:GridViewCommandColumn ShowSelectCheckbox="true" VisibleIndex="0" Width="50px"
                    FixedStyle="Left">
                    <HeaderTemplate>
                        <input type="checkbox" onclick="grid.SelectAllRowsOnPage(this.checked);" title="全选/全不选"
                            id="chkAll" runat="server" />
                    </HeaderTemplate>
                    <HeaderStyle HorizontalAlign="Center" />
                </cms:GridViewCommandColumn>
                <cms:GridViewDataTextColumn Caption="操作" VisibleIndex="2" Width="120px" HeaderStyle-HorizontalAlign="Center"
                    CellStyle-HorizontalAlign="Center" FixedStyle="Left">
                    <DataItemTemplate>
                        <div class="operateBox">
                            <a class="btn-text-edit" href="PartContentSet.aspx?id=<%# Eval("ID") %>&partid=<%=PartID %>"
                                title="编辑"></a>&nbsp;&nbsp;<a class="btn-text-del" onclick="window.setTimeout(function(){aspxGVDeleteRow('ctl00_Content_grid',<%# Container.ItemIndex %>);},0)"
                                    title="删除"></a>
                        </div>
                    </DataItemTemplate>
                </cms:GridViewDataTextColumn>
                <cms:GridViewDataTextColumn Caption="标题" VisibleIndex="3" HeaderStyle-HorizontalAlign="Center"
                    CellStyle-HorizontalAlign="Left" FieldName="Name">
                    <Settings AutoFilterCondition="Contains"></Settings>
                </cms:GridViewDataTextColumn>
                <cms:GridViewDataTextColumn Caption="栏目" VisibleIndex="4" Width="100px" HeaderStyle-HorizontalAlign="Center"
                    CellStyle-HorizontalAlign="Center" FieldName="PartName">
                    <Settings AutoFilterCondition="Contains"></Settings>
                </cms:GridViewDataTextColumn>
                <cms:GridViewDataTextColumn Caption="是否显示" VisibleIndex="5" Width="80" HeaderStyle-HorizontalAlign="Center"
                    CellStyle-HorizontalAlign="Center" FieldName="TCDisplay">
                    <Settings AutoFilterCondition="Contains"></Settings>
                </cms:GridViewDataTextColumn>
                <cms:GridViewDataTextColumn Caption="是否置顶" VisibleIndex="6" Width="80" HeaderStyle-HorizontalAlign="Center"
                    CellStyle-HorizontalAlign="Center" FieldName="TcWebStick">
                    <Settings AutoFilterCondition="Contains"></Settings>
                </cms:GridViewDataTextColumn>
                 <cms:GridViewDataTextColumn Caption="排序编号" VisibleIndex="7" Width="100px" HeaderStyle-HorizontalAlign="Center"
                    CellStyle-HorizontalAlign="Center" FieldName="SortID">
                    <Settings AutoFilterCondition="Contains"></Settings>
                </cms:GridViewDataTextColumn>
                <cms:GridViewDataDateColumn Caption="创建时间" VisibleIndex="9" Width="200px" HeaderStyle-HorizontalAlign="Center"
                    CellStyle-HorizontalAlign="Center" FieldName="CreateTime">
                    <PropertiesDateEdit DisplayFormatString="{0:yyyy-MM-dd HH:mm:ss}">
                    </PropertiesDateEdit>
                </cms:GridViewDataDateColumn>
            </Columns>
        </cms:ASPxGridView>
        <cms:ASPxGridViewExporter ID="gridExport" runat="server" GridViewID="grid" ExportedRowType="Selected">
        </cms:ASPxGridViewExporter>
    </div>
    <script type="text/javascript">
        $(function () {
            $(".slidedownbtn").live("click", function () {
                $(".slidedownmenu").fadeIn();
            });

            $(".slidedown").live("mouseleave", function () {
                $(".slidedownmenu").fadeOut();
            });
        });

        function ProSet(proType) {
            $("#<%=txtProType.ClientID %>").val(proType);
            $("#<%=btnProButton.ClientID %>").click();
        }
    </script>
</asp:Content>
